#pragma once

#include "Client.h"
#include "Generator.h"
#include "Config.h"

class Car
{
public:

	Car(int id)
		: id(id)
	{
		client = new Client(this);

		liters = Generator::GetNormal(Config::TankMean, Config::TankSd);
		liters = liters < 0 ? 1 : liters;

		isPaying = false;
	}

	virtual ~Car(void)
	{
		delete client;
	}

	int GetLiters()
	{
		return liters;
	}	

	Client* GetClient()
	{
		return client;
	}

	void *GetDistributor()
	{
		return distributor;
	}

	void SetDistributor(void *distributor)
	{
		this->distributor = distributor;
	}

	bool IsPaying()
	{
		return isPaying;
	}

	void SetIsPaying(bool isPaying)
	{
		this->isPaying = isPaying;
	}

	int GetId()
	{
		return id;
	}

private:
	void *distributor;
	Client* client;
	int liters;
	bool isPaying;
	int id;
};

